home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
pull20.zip
/
PULLVARS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-01-11
|
7KB
|
174 lines
{ =========================================================================== }
{ PullVars.pas - Variables for Multi-level pull-down menus. ver 2.0, 01-12-87 }
{ }
{ This file contains all the variables needed for PULL20.TPU. You cannot }
{ change this file unless you have the complete PULL20.PAS source code. }
{ =========================================================================== }
{$R-,S-,I-,D-,T-,F-,V-,B-,N-,L+ }
UNIT PullVars;
INTERFACE
uses WndwVars;
const
MaxMenuLines = 15; { For Main and Sub menus }
MaxCharsPerLine = 20; { For Main and Sub menus and Data Windows }
MaxStringLength = 80; { Screen limit }
LastMainMenu = 8; { 1 - 255 }
NumOfMainMenus = 8; { 1 - 255 }
NumOfSubMenus = 5; { 1 - 255 }
NumOfDataWndws = 12; { 1 - 255 }
NumOfHelpWndws = 14; { 1 - 255 }
NumOfMsgLines = 11; { 1 - 255 }
NumOfErrMsgLines = 8; { 1 - 65535 }
MaxErrStrLength = 60; { Error messages are usually shorter }
TotalHelpLines = 81; { 1 - 65535 }
HelpCharsPerLine = 50; { 1 - Screen limit }
type
LineModeType = (Choice, ExecOnly, Comment, Partition,
ToDataWndw, ToSubMenu, ToUserWndw);
MenuModeType = (ExecChoice, ExecSingleChoice, ExecMultipleChoice,
SingleChoice, MultipleChoice);
TypeOfDataType = (Bytes,Words,Integers,LongInts,Reals,UserNums,Chars,
Strings,UserStrings);
Toggle = (Off, On, No, Yes);
MaxString = string[MaxStringLength];
ErrMsgString = string[MaxErrStrLength];
MenuRec = record
Title: string[MaxCharsPerLine];
CmdLtrs: string[MaxMenuLines];
Line: array[1..MaxMenuLines] of string[MaxCharsPerLine];
LineMode: array[1..MaxMenuLines] of LineModeType;
Flagged: array[1..MaxMenuLines] of boolean;
LinkNum: array[1..MaxMenuLines] of byte;
LinkDir: DirType;
MenuMode: MenuModeType;
MenuLines: byte;
NameCol: byte;
Row, Col, Rows, Cols: byte;
DefaultLine, HiLiteLine, SingleFlagLine: byte;
Battr, Wattr, Hattr, Lattr, Cattr: byte;
Border: Borders;
BackToDefault, Changed: boolean;
MsgLineNum, HelpWndwNum: byte;
end;
DataWndwRec = record
Line: array[1..2] of string[MaxCharsPerLine];
TypeOfData: TypeOfDataType;
Row, Col, Rows, Cols: byte;
RowAlt, ColAlt: byte;
FirstCol, Field: byte;
Decimals: integer;
Justify: DirType;
Battr, Wattr, Hattr: byte;
Border: Borders;
MsgLineNum, HelpWndwNum: byte;
end;
HelpWndwRec = record
FirstLine, LastLine: byte;
LinesToShow: byte;
Row, Col, Rows, Cols: byte;
Battr, Wattr: byte;
Border: Borders;
HWmodes: byte;
MsgLineNum: byte
end;
DwordPtr = ^longint;
const
HelpKey = #59; { F1 } { Set equal to #00 if Help access is not wanted. }
PopKey = #60; { F2 }
TopKey1 = #68; { F10 } { Extended function key }
TopKey2 = #47; { '/' }
EscKey = #27; { ^[ }
RetKey = #13; { ^M }
NullKey = #00; { null }
HideCursor = $2000; { CursorMode to hide the cursor. }
InWorkWndw: boolean = true;
Quit: boolean = false;
WaitForKbd: boolean = true;
EnableKeyStatus: boolean = true;
CurrentMsgLineNum: word = 0; { Index of the message currently shown. }
var
MainMenu: array[1..NumOfMainMenus] of MenuRec;
SubMenu: array[1..NumOfSubMenus] of MenuRec;
DataWndw: array[1..NumOfDataWndws] of DataWndwRec;
HelpWndw: array[1..NumOfHelpWndws] of HelpWndwRec;
HelpLine: array[1..TotalHelpLines] of string[HelpCharsPerLine];
MsgLine: array[1..NumOfMsgLines] of MaxString;
ErrMsgLine: array[1..NumOfErrMsgLines] of ErrMsgString;
TopMenuRecPtr: ^MenuRec; { Points to the current Menu record }
TopMenuRow, MainMenuRow,
InitAttr, StatusAttr,
TopMenuAttr, TopMenuHattr, TopMenuLattr, MsgLineAttr, KeyStatusAttr,
MainMenuWattr, MainMenuBattr, MainMenuHattr, MainMenuLattr, MainMenuCattr,
SubMenuWattr, SubMenuBattr, SubMenuHattr, SubMenuLattr, SubMenuCattr,
HelpWndwWattr, HelpWndwBattr: byte;
MainMenuBrdr, SubMenuBrdr, HelpWndwBrdr: Borders;
HelpWndwModes: byte;
HelpMsgLineNum: word;
TopCmdLtrs: string[NumOfMainMenus];
CmdSeq,MoreCmdSeq: string[MaxWndw]; { Sequence of keys pressed. }
RowsBelowHelp,RowsBelowMsg: byte;
MPulled, SPulled, HiLited: byte;
TopMenuStr: MaxString;
ExtKey,
LocationWarning: boolean;
Key: char;
CapsLockCol: byte;
{ Controls to Pull/Pop the menus. }
PullDown, Pop: boolean;
PopLevels: byte;
PopToWorkWndw, PopToTop, PopAndProcess,
AccessedWorkWndw, AccessedMenus: boolean;
WorkWndwStep: word;
{ These are addresses for the indirect forward calls out of PULL.TPU }
AddrGetUserPullStats, AddrGetOverrideStats,
AddrProcess, AddrWorkWndw,
AddrDataTransfer, AddrCheckGlobalKeys: DwordPtr;
{ Variables for Data Entry procedures }
type
DataPadRec = record
StoreMode,Valid,DataStored,NewData: boolean;
case TypeOfData: TypeOfDataType of
Bytes: (Bdata: byte);
Words: (Wdata: word);
Integers: (Idata: integer);
LongInts: (Ldata: longint);
Reals: (Rdata: real);
UserNums: (UNdata: MaxString);
Chars: (Cdata: char);
Strings: (Sdata: MaxString);
UserStrings: (USdata: MaxString);
end;
var
DataPad: DataPadRec;
DataWndwWattr, DataWndwBattr: byte;
DataWndwBrdr: Borders;
AutoNumLock: boolean;
DataEntryStr: MaxString; { Global variable for Work window (not affected by
DataWndw entries). }
UserCharSet: set of char;
const
DelKey = #83;
BSKey = #08;
IMPLEMENTATION
BEGIN
DataPad.NewData:=true;
END.